#!/usr/bin/env python
# coding: utf-8

# In[1]:


import numpy as np


# In[8]:


score_of_1 = np.random.randint(0,100,(50,3))
score_of_1


# In[9]:


score_of_2 = np.random.randint(0,100,(50,3))
score_of_2


# In[10]:


score_of_3 = np.random.randint(0,100,(50,3))
score_of_3


# In[11]:


score_of_4 = np.random.randint(0,100,(50,3))
score_of_4


# In[12]:


score_of_5 = np.random.randint(0,100,(50,3))
score_of_5


# In[13]:


score_of_6 = np.random.randint(0,100,(50,3))
score_of_6


# In[15]:


score = np.vstack((score_of_1,score_of_2,score_of_3,score_of_4,score_of_5,score_of_6))


# In[16]:


score.shape


# In[19]:


# 1代表男生，0代表女生
sex = np.random.randint(0,2,(300,1))
sex


# In[31]:


data = np.hstack((score,sex))
data


# In[41]:


# 第一列python成绩 第二列数学成绩 第三列英语成绩
cond = data[:,3] == 0
score_girl_min = data[cond].min(axis = 0)
score_girl_min[:3]


# In[42]:


cond = data[:,3] == 0
score_girl_max = data[cond].max(axis = 0)
score_girl_max[:3]


# In[43]:


cond = data[:,3] == 0
score_girl_mean = data[cond].mean(axis = 0)
score_girl_mean[:3]


# In[46]:


cond = data[:,3] == 0
score_girl_median = np.median(data[cond],axis = 0)
score_girl_median[:3]


# In[47]:


cond = data[:,3] == 0
score_girl_std = np.std(data[cond],axis = 0)
score_girl_std[:3]


# In[49]:


cond1 = data[:,3] == 1
score_boy_min = data[cond1].min(axis = 0)
score_boy_min[:3]


# In[50]:


cond1 = data[:,3] == 1
score_boy_max = data[cond1].max(axis = 0)
score_boy_max[:3]


# In[51]:


cond1 = data[:,3] == 1
score_boy_mean = data[cond1].mean(axis = 0)
score_boy_mean[:3]


# In[52]:


cond1 = data[:,3] == 1
score_boy_median = np.median(data[cond1],axis = 0)
score_boy_median[:3]


# In[53]:


cond1 = data[:,3] == 1
score_boy_std = np.std(data[cond1],axis = 0)
score_boy_std[:3]


# In[ ]:




